package ooday05.homework;

public class StaticDemo {
    public static void main(String[] args) {
        StaticVar o1 = new StaticVar();
        o1.show();// 非静态方法
        StaticVar o2 = new StaticVar();
        o2.show();
        StaticVar o3 = new StaticVar();
        o3.show();
        // 通过类名访问静态变量
        System.out.println(StaticVar.b);// 3

        StaticBlock o4 = new StaticBlock();
        StaticBlock o5 = new StaticBlock();
        StaticBlock o6 = new StaticBlock();

        StaticMethod.test();// 静态方法

    }
}
